// import { getUserPermission, hasPermission } from 'services/permission'
import permissions from 'services/permission.json'


export const getApi = (code: string, kid?: string) => {
	let url = '';
	permissions.forEach((permission: any) => {
		if (permission.code === code)
			url = permission.url;
	})
	if (!url)
		console.error(`无法找到code对应的url,当前code：${code}，一个检查是否正确`)
	if (kid) url.replace(/{kid}/g, kid)
	return url
}